package com.innovation.wjrpc.server;

import com.innovation.wjrpc.protocol.Request;
import com.innovation.wjrpc.util.ReflectionUtils;

/**
 * @author innoyiya
 * @date 2021/9/7 20:04
 */
public class ServiceInvoker {

    public Object invoke(ServiceInstance service, Request request) {
        return ReflectionUtils.invoke(service.getTarget(), service.getMethod(), request.getParameters());
    }
}
